<?php
	require_once("../database/hierarchies.php");
	require_once("../messages.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		<title>Creating a new node in the taxonimic tree</title>
	</head>
	<body>
		<p><?php getFlash(); ?></p>
		<h1>Creating a new node in the taxonimic tree</h1>
		<form name='new_node' id='new_node' method='post' action='save.php'>
			<input type='hidden' name='id' id='id' value='NULL'>
			<input type='hidden' name='node_id' id='node_id' value='<?php echo isset($_GET['node_id']) ? $_GET['node_id'] : 'NULL' ?>'>
			<label for='hierarchy_id'>Hierarchy: </label>
			<select name='hierarchy_id' id='hierarchy'>
				<?php
					printHierarchiesAsOptions();
				?>
			</select><br>
			<label for='name'>Name: </label><input type='text' name='name' id='name'><br>
			<label for='short_desc'>Short description about this node: </label><br>
			<textarea name='short_desc' id='short_desc'></textarea><br>
			<label for='long_desc'>Long description about this node: </label><br>
			<textarea name='long_desc' id='long_desc'></textarea><br>
			<input type='submit' value='Save'>
		</form>
	</body>
</html>
